package com.itheima.mycollection;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionDemo {
    public static void main(String[] args) {
        Collection<String> collection = new ArrayList<String>();
        collection.add("坂田大郎");
        collection.add("坂田次郎");
        collection.add("坂田太郎");

        int size = collection.size();
        System.out.println("size = " + size);

        if (collection.contains("坂田大郎")){
            collection.remove("坂田大郎");
        }

        size = collection.size();
        System.out.println("size = " + size);

        System.out.println(collection.isEmpty());
    }
}
